//
//  BMABase.m
//  LZMusicPlayer
//
//  Created by wulanzhou on 2016/11/1.
//  Copyright © 2016年 wulanzhou. All rights reserved.
//

#import "BMABase.h"

@interface BMABase (){
    NSString* (^BlockRequestURL)();
}

@end

@implementation BMABase

- (NSString *)baseURLString{

    NSString *FORMATE = @"json";
    NSString *BASE = @"http://tingapi.ting.baidu.com/v1/restserver/ting?from=ios&version=5.6.5.6&format=%@";
    
    return [NSString stringWithFormat:BASE,FORMATE];
}

- (NSString *)requestURL{

    if(BlockRequestURL){
        return BlockRequestURL();
    }
    
    return [self baseURLString];
}

#pragma mark -请求方法重写
- (void)setCZRequestURL:(NSString*(^)())aRequestURL{
    BlockRequestURL=aRequestURL;
}

@end
